| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

GamepadDevice.h
1 // GamepadDevice.h
3 //
5
6 namespace nkInputs
7 {
21 class GamepadDevice
22 {
23 public :
24
25 // Constructor, destructor
32 GamepadDevice (System* system) noexcept ;
36 virtual ~GamepadDevice () ;
37
38 // Getters
42 System* getSystem () const ;
46 virtual GamepadJoystickStatus getLeftJoystickStatus () const = 0 ;
50 virtual GamepadJoystickStatus getRightJoystickStatus () const = 0 ;
56 virtual float getLeftTriggerStatus () const = 0 ;
62 virtual float getRightTriggerStatus () const = 0 ;
67 virtual bool isButtonDown (GAMEPAD_DEVICE_BUTTON button) const = 0 ;
68
69 // Setters
77 virtual void setGamepadSlot (unsigned int v) = 0 ;
85 virtual void setLeftJoystickDeadzone (float v) = 0 ;
93 virtual void setRightJoystickDeadzone (float v) = 0 ;
101 virtual void setTriggersDeadzone (float v) = 0 ;
108 virtual void setLeftMotorVibration (float v) = 0 ;
115 virtual void setRightMotorVibration (float v) = 0 ;
116
117 // Update
121 virtual void update () = 0 ;
122
123 public :
124
125 // Statics
126 // Creation
134 static nkMemory::UniquePtr<GamepadDevice> create (System* system = nullptr) ;
135 } ;
136 }
nkInputs::GamepadDevice::getRightTriggerStatus
virtual float getRightTriggerStatus() const =0
nkInputs::GamepadDevice::getLeftTriggerStatus
virtual float getLeftTriggerStatus() const =0
nkInputs::GamepadDevice::isButtonDown
virtual bool isButtonDown(GAMEPAD_DEVICE_BUTTON button) const =0
nkInputs::GAMEPAD_DEVICE_BUTTON
GAMEPAD_DEVICE_BUTTON
Enumeration of the available buttons on a gamepad.
Definition: GamepadDeviceButton.h:14
nkInputs::GamepadDevice::getSystem
System * getSystem() const
nkInputs::GamepadDevice
A device abstracting a gamepad controller.
Definition: GamepadDevice.h:22
nkInputs::GamepadDevice::getRightJoystickStatus
virtual GamepadJoystickStatus getRightJoystickStatus() const =0
nkInputs::System
Main interface with the component.
Definition: System.h:38
nkInputs
Encompasses all API of component NilkinsInputs.
Definition: GamepadDeviceButton.h:7
nkInputs::GamepadDevice::setGamepadSlot
virtual void setGamepadSlot(unsigned int v)=0
nkInputs::GamepadDevice::GamepadDevice
GamepadDevice(System *system) noexcept
nkInputs::GamepadDevice::getLeftJoystickStatus
virtual GamepadJoystickStatus getLeftJoystickStatus() const =0
nkInputs::GamepadDevice::create
static nkMemory::UniquePtr< GamepadDevice > create(System *system=nullptr)
nkInputs::GamepadDevice::setLeftMotorVibration
virtual void setLeftMotorVibration(float v)=0
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkInputs::GamepadDevice::setRightJoystickDeadzone
virtual void setRightJoystickDeadzone(float v)=0
nkInputs::GamepadDevice::setTriggersDeadzone
virtual void setTriggersDeadzone(float v)=0
nkInputs::GamepadDevice::~GamepadDevice
virtual ~GamepadDevice()
nkInputs::GamepadDevice::update
virtual void update()=0
nkInputs::GamepadDevice::setLeftJoystickDeadzone
virtual void setLeftJoystickDeadzone(float v)=0
nkInputs::GamepadJoystickStatus
Holds a gamepad's joystick's status, for now its current position.
Definition: GamepadJoystickStatus.h:12
nkInputs::GamepadDevice::setRightMotorVibration
virtual void setRightMotorVibration(float v)=0